Skip to content

Conversation

@andreiborza
Copy link
Member

The ErrorBoundary exported in the SDK only works on the client and is not intended to be used.

Use react router's error boundary instead: https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries.

The ErrorBoundary exported in the SDK only works on the client and is not
intended to be used.

Use react router's error boundary instead: https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries
/**
* @deprecated ErrorBoundaryProps and FallbackRender are deprecated, use react router's error boundary instead.
* See https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Deprecation Paradox: API Surface Expansion (Bugbot Rules)

This change introduces new public API exports for ErrorBoundaryProps and FallbackRender types that were not previously exported from this package. While marked as deprecated, adding new exports contradicts the PR's intention to deprecate ErrorBoundary functionality. If these types weren't needed before, exporting them now (even as deprecated) expands the public API surface unnecessarily.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They were exported before...

@andreiborza andreiborza enabled auto-merge (squash) November 14, 2025 14:49
@andreiborza andreiborza merged commit 74822de into develop Nov 14, 2025
39 checks passed
@andreiborza andreiborza deleted the ab/deprecate-rr-errorboundary branch November 14, 2025 21:27
export { captureReactException, reactErrorHandler, Profiler, withProfiler, useProfiler } from '@sentry/react';

/**
* @deprecated ErrorBoundary is deprecated, use react router's error boundary instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @deprecated ErrorBoundary is deprecated, use react router's error boundary instead.
* @deprecated ErrorBoundary is deprecated, use React Router's error boundary instead.

Looks a bit more professional if we use the official name in the public exports (same as below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will ammend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants